package com.service;

import com.util.Result;
import org.springframework.cloud.openfeign.FeignClient;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestParam;

@FeignClient(value = "site", contextId = "assignOrderApiService")
public interface AssignOrderApiService {

    @GetMapping("findOrderByPageAndOrderStateAndSiteId")
    Result findOrderByPageAndOrderStateAndSiteId(@RequestParam("orderState") String orderState,
                                                 @RequestParam("current") Integer current,
                                                 @RequestParam("pageSize") Integer pageSize);

    @GetMapping("findRecycleByPageAndRecycleWorkStateAndRecyclerApproveState")
    Result findRecycleByPageAndRecycleWorkStateAndRecyclerApproveState(@RequestParam("recyclerApproveState") String recyclerApproveState,
                                                                       @RequestParam("recycleWorkState") String recycleWorkState,
                                                                       @RequestParam("current") Integer current,
                                                                       @RequestParam("pageSize") Integer pageSize);

    @PostMapping("setOrderOfRecyclerIdByOrderSerialNumber")
    Result setOrderOfRecyclerIdByOrderSerialNumber(@RequestParam("recyclerId") Integer recyclerId,
                                                            @RequestParam("orderSerialNumber") String orderSerialNumber);

}
